﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using l1cs.server.model.Instance;

namespace l1cs.server.serverpackets
{
    public class S_OwnCharStatus2 : ServerBasePacket
    {
        public S_OwnCharStatus2( L1PcInstance l1pcinstance )
        {
            if ( l1pcinstance == null )
            {
                return;
            }

            cha = l1pcinstance;

            writeC( Opcodes.S_OPCODE_OWNCHARSTATUS2 );
            writeC( cha.getStr() );
            writeC( cha.getInt() );
            writeC( cha.getWis() );
            writeC( cha.getDex() );
            writeC( cha.getCon() );
            writeC( cha.getCha() );
            writeC( cha.getInventory().getWeight240() );
        }

        override
        public byte[] getContent()
        {
            return getBytes();
        }

        override
        public String getType()
        {
            return "[C] S_OwnCharStatus2";
        }
        
        private static Logger _log = Logger.getLogger( typeof( S_OwnCharStatus2 ).FullName );

        private L1PcInstance cha = null;
    }
}